<?php

declare(strict_types=1);

namespace App\CustHub\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

/**
 * 发送记录状态
 */
#[Constants]
class SendRecordStatusConstants extends AbstractConstants
{
    /**
     * @Message("等待中")
     */
    public const WAITING = 0;

    /**
     * @Message("发送中")
     */
    public const SENDING = 1;

    /**
     * @Message("发送成功")
     */
    public const SUCCESS = 2;

    /**
     * @Message("发送失败")
     */
    public const FAILURE = 3;

    /**
     * @Message("暂停")
     */
    public const PAUSE = 4;

    /**
     * @Message("取消")
     */
    public const CANCEL = 5;

    /**
     * 允许发送的状态
     * @return int[]
     */
    public static function getAllowSendStatus(): array
    {
        return [
            self::WAITING,
            self::SENDING
        ];
    }
}